package cn.stylefeng.guns.core;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import weixin.utils.WXPublicUtils;


/**
 * @author txl
 * @version 1.0
 * @date 2021/4/13 18:59
 * @description
 */
@Component
public class WXPublicSchedue {
    /**
     * 定时任务 在引入的主项目中 写一个定时任务器 定时刷新token
     */
    @Scheduled(fixedDelay = 1000*3500*2)
    public void getAccessToken() {
        WXPublicUtils.accessToken();
        System.out.println("定时任务");
    }
}
